//
//  headerView.m
//  HaHa
//
//  Created by lanou3g on 15/9/24.
//  Copyright (c) 2015年 吉亚平. All rights reserved.
//

#import "headerView.h"

@implementation headerView

-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self addControls];
    }
    return self;
}

- (void)addControls
{
    _HeadPortraitPic = [[UIImageView alloc] initWithFrame:CGRectMake(5, 5, 40, 40)];
    _HeadPortraitPic.backgroundColor = [UIColor redColor];
    [self addSubview:_HeadPortraitPic];
    
    _PublishedName = [[UILabel alloc] initWithFrame:CGRectMake(_HeadPortraitPic.bounds.size.width + 5, 5, kScreenWdth - _HeadPortraitPic.Y - 10, 40)];
    [self addSubview:_PublishedName];
    
    _image = [[UIImageView alloc] initWithFrame:CGRectMake(5, _PublishedName.Y + 5, kScreenWdth - 10, 150)];
    _image.backgroundColor = [UIColor cyanColor];
    [self addSubview:_image];
    
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
